﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Move : MonoBehaviour {

    public GameObject obj;

	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		
	}

	public void JoyStickControlMove(Vector2 direction)
	{
       // obj.transform.rotation = Quaternion.LookRotation(new Vector3(0, direction.y, 0));
       // obj.transform.Rotate(new Vector3(0, direction.y, 0));

        obj.transform.Translate(Vector3.forward * Time.deltaTime * 0.1f * direction.y);
        obj.transform.Rotate(new Vector3(0, 5.0f * Time.deltaTime *direction.x, 0));
		//Vector3.forward * Time.deltaTime * 0.1f
	}
}
